//食物的类
(function(window) {
    class Food extends Render {
        constructor(width, height, bgColor, x, y) {
            super(width, height, bgColor, x, y);
            this.width = width || 0.15;
            this.height = height || 0.15;
            this.bgColor = bgColor || '#333';
            this.x = x || 0;
            this.y = y || 0;
        }
        initial = function(width, height, bgColor, x, y) {
            this.width = width || 0.15;
            this.height = height || 0.15;
            this.bgColor = bgColor || '#333';
            this.x = x || 0;
            this.y = y || 0;
        }
        repos = function(x, y) {
            this.x = x;
            this.y = y;
        }
    }
    window.Food = Food;
}(window))